home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-05
/
chkcd10.zip
/
CHKCD10.DOC
< prev
next >
Wrap
Text File
|
1992-07-23
|
3KB
|
77 lines
Program: Check CD (CHKCD)
Version: 1.0
Author: George Spafford
Date: 07/23/92
Purpose:
To quickly identify whether there is a carrier or not on a specified
comm port and to pass this result to DOS via the DOS ERRORLEVEL to
facilitate the batch programming required in large communication installations
such as a BBS.
Procedure:
Put CHKCD anywhere in a batch file when you need to test for the carrier. For
example, I check for carrier in batch files to decide whether to operate a
program in local or remote modes. Use CHKCD as follows:
CHKCD CommPort
CommPort is the one comm port that you want to check. It can be
comm port 1, 2, 3, or 4. For example:
CHKCD 2 <- tests COM2
The carrier test is nondestructive & it will not drop DTR when it runs. Here is
an example of CHKCD in a sample batch file:
:FFAM
CHKCD 1 ;check for carrier on COM1
If errorlevel = 1 goto FFRMT ;if carrier then run as remote
If errorlevel = 0 goto FFLCL ;if no carrier run locally
goto RELOAD
:FFRMT
CTTY COM1 ;redirect through COM1
FIDO-FAM flsearch.ctl <COM1 >COM1 ;run program and redirect to COM1
CTTY CON ;return control to console
goto RELOAD
:FFLCL
FIDO-FAM flsearch.ctl
goto RELOAD
:RELOAD
By testing COM1 in the :FFAM label, we can determine how to run the application.
If CHKCD returns an errorlevel of 1 then it has established that there is a
carrier and that the application should be run in remote mode (:FFRMT).
On the other hand, if the errorlevel is 1, then no carrier was found and the
application should be run locally (:FFLCL).
CHKCD is shareware. As such, you can use CHKCD for 30 days. If you continue to
use the program after this period, you must register it in order to continue
using it legally. CHKCD is $10 per copy. If you are running a multi-node BBS
that has the same name on all nodes, then you only need to register one copy.
Otherwise, you must register each copy of CHKCD that you use.
Please make payments in US Currency (no cash please) to:
George Spafford
3001 Lakeshore Drive #329
Saint Joseph, MI 49085
Comments and/or questions are always welcome. I can be reached via the mail,
EXEC-PC or Queued Access:
Queued Access BBS: (616) 468-5026 USR Dual Std 19200-8-N-1
CHKCD IS DISTRIBUTED AS IS. THE AUTHOR (GEORGE SPAFFORD) MAKES NO WARRANTY OF
ANY KIND, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THIS
SOFTWARE AND DOCUMENTATION. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
DAMAGES, INCLUDING LOST PROFITS, LOST SAVINGS, OR ANY OTHER INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF OR THE INABILITY TO USE THIS
PROGRAM.